---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.12.0
  labels:
    heritage: deckhouse
    module: node-manager
  name: sshcredentials.deckhouse.io
spec:
  group: deckhouse.io
  names:
    kind: SSHCredentials
    listKind: SSHCredentialsList
    plural: sshcredentials
    singular: sshcredentials
  scope: Cluster
  versions:
    - name: v1alpha1
      schema:
        openAPIV3Schema:
          description: |
            Contains credentials required by Cluster API Provider Static (CAPS) to connect over SSH. CAPS connects to the server (virtual machine) defined in the [StaticInstance](cr.html#staticinstance) custom resource to manage its state.
            
            A reference to this resource is specified in the [credentialsRef](cr.html#staticinstance-v1alpha1-spec-credentialsref) parameter of the `StaticInstance` resource.
          properties:
            apiVersion:
              description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. [More info...](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources)'
              type: string
            kind:
              description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. [More info...](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds)'
              type: string
            metadata:
              type: object
            spec:
              description: SSHCredentialsSpec defines the desired state of SSHCredentials.
              properties:
                privateSSHKey:
                  description: |
                    Private SSH key in PEM format encoded as base64 string.
                  type: string
                sshExtraArgs:
                  description: |
                    A list of additional arguments to pass to the openssh command.
                  type: string
                  x-doc-examples:
                    - -vvv
                    - -c chacha20-poly1305@openssh.com
                    - -c aes256-gcm@openssh.com
                    - -m umac-64-etm@openssh.com
                    - -m hmac-sha2-512-etm@openssh.com
                sshPort:
                  description: |
                    A port to connect to the host via SSH.
                  default: 22
                  maximum: 65535
                  minimum: 1
                  type: integer
                sudoPassword:
                  description: |
                    A sudo password for the user.
                  type: string
                user:
                  description: |
                    A username to connect to the host via SSH.
                  type: string
              required:
                - privateSSHKey
                - user
              type: object
          type: object
      served: true
      storage: true
